<template>
	<view class="index">
		<view class="jtop">
			<view class="status_bar">
				<!-- 这里是状态栏 -->
			</view>

			<view class="jtop_l" @tap="navigateBack" v-if="!syj">
				<image src="../../static/img/ic_back.png"></image>
			</view>

			<view v-if="syj">
				<view class="jtop_l" @tap="navigateBack">
					<image src="../../static/img/ic_back.png"></image>上一级
				</view>
				<view class="jtop_l" @tap="navigateBack">关闭</view>
			</view>

			<view class="jtop_c">私人盘</view>

			<view class="jtop_r" @click="jshow_pop('jtop_rl')">
				<image src="../../static/img/doc/ic_add.png"></image>
			</view>
		</view>
		<view class="tophr"></view>
		<!-- <uni-search-bar placeholder="搜索" @confirm="search" class="ss"></uni-search-bar> -->
		<view class="nav">
			<text>个人</text>
			<image src="../../static/img/mbx.png"></image><text class="active">私人盘</text>
		</view>

		<!-- 文件夹列表 -->
		<view class="doc_t">文件夹</view>
		<view class="doc_bs">
			<!-- <view class="doc_b op5">
				<image src="../../static/img/doc/ic_folder.png" class="doc_bl"></image>
				<text class="doc_bt">墨斗文档</text>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop"></image>
			</view> -->
			<view class="doc_b " v-for="(item, index) in folderList" :key="item.id">
				<image src="../../static/img/doc/ic_folder.png" class="doc_bl"></image>
				<text class="doc_bt">{{ item.name }}</text>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop(item.id, item.name, 'jfolder')"></image>
			</view>
			<!-- <view class="doc_b ">
				<image src="../../static/img/doc/ic_folder.png" class="doc_bl"></image>
				<text class="doc_bt">工地视频</text>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop"></image>
			</view>
			<view class="doc_b noborder">
				<image src="../../static/img/doc/ic_folder.png" class="doc_bl"></image>
				<text class="doc_bt">施工日志</text>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop"></image>
			</view> -->
		</view>
		
		<!-- 文件列表 -->
		<view class="doc_t">文件</view>
		<view class="doc_bs">
			<!-- <view class="doc_b">
				<image src="../../static/img/doc/ic_word.png" class="doc_bl"></image>
				<view class="doc_b2">
					<text class="doc_b2t">墨斗项目需求.doc</text>
					<text class="doc_b2f">10K · 宋旋 · 05/10</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br"></image>
			</view> -->
			<view class="doc_b noborder" v-for="(item, index) in fileList" :key="item.id">

				<image v-if="(item.suffix = 'png')" src="../../static/img/doc/ic_pic.png" class="doc_bl"></image>
				<image v-else-if="(item.suffix = 'pdf')" src="../../static/img/doc/ic_pdf.png" class="doc_bl"></image>
				<image v-else-if="(item.suffix = 'exl')" src="../../static/img/doc/ic_excel.png" class="doc_bl"></image>
				<image v-else-if="(item.suffix = 'xlsx')" src="../../static/img/doc/ic_excel.png" class="doc_bl"></image>
				<image v-else-if="(item.suffix = 'doc')" src="../../static/img/doc/ic_word.png" class="doc_bl"></image>
				<image v-else-if="(item.suffix = 'docx')" src="../../static/img/doc/ic_word.png" class="doc_bl"></image>
				<image v-else src="../../static/img/doc/ic_file_unknowl.png" class="doc_bl"></image>


				<view class="doc_b2">
					<text class="doc_b2t">{{item.name}}</text>
					<text class="doc_b2f">{{item.capacity}}KB · {{item.updateName}} · {{item.updateTime}}</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop(item.id, item.name, 'wj')"></image>
			</view>
			<!-- <view class="doc_b noborder op5">
				<image src="../../static/img/doc/ic_pdf.png" class="doc_bl"></image>
				<view class="doc_b2">
					<text class="doc_b2t">欢迎使用墨斗文档.pdf</text>
					<text class="doc_b2f">97.4M · 宋旋 · 2019/12/02</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop"></image>
			</view> -->

			<!-- <view class="doc_b noborder op5">
				<image src="../../static/img/doc/ic_pdf.png" class="doc_bl"></image>
				<view class="doc_b2">
					<text class="doc_b2t">欢迎使用墨斗文档.pdf</text>
					<text class="doc_b2f">97.4M · 宋旋 · 2019/12/02</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop"></image>
			</view>

			<view class="doc_b" v-for="(item_awj, index) in item_wj" :key="item_awj.id">
				<image v-if="(item_awj.lx = 'png')" src="../../static/img/doc/ic_pic.png" class="doc_bl"></image>
				<image v-else-if="(item_awj.lx = 'pdf')" src="../../static/img/doc/ic_pdf.png" class="doc_bl"></image>
				<image v-else-if="(item_awj.lx = 'exl')" src="../../static/img/doc/ic_excel.png" class="doc_bl"></image>
				<image v-else-if="(item_awj.lx = 'xlsx')" src="../../static/img/doc/ic_excel.png" class="doc_bl"></image>
				<image v-else-if="(item_awj.lx = 'doc')" src="../../static/img/doc/ic_word.png" class="doc_bl"></image>
				<image v-else-if="(item_awj.lx = 'docx')" src="../../static/img/doc/ic_word.png" class="doc_bl"></image>
				<image v-else src="../../static/img/doc/ic_file_unknowl.png" class="doc_bl"></image>

				<view class="doc_b2">
					<text class="doc_b2t">{{ item_awj.name }}</text>
					<text class="doc_b2f">{{ item_awj.capacity }}M · {{ item_awj.name }} ·
						{{ item_awj.name }}</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br" @click="jshow_pop(item_awj.id, item_awj.name, 'wj')"></image>
			</view> -->

			<!-- <view class="doc_b noborder">
				<image src="../../static/img/doc/ic_file_unknowl.png" class="doc_bl"></image>
				<view class="doc_b2">
					<text class="doc_b2t">安全技术交底多组示例</text>
					<text class="doc_b2f">97.4M · 宋旋 · 2019/12/02</text>
				</view>
				<image src="../../static/img/doc/ic_ellipsis 3.png" class="doc_br"></image>
			</view> -->
		</view>

		<!-- 固定底部按钮 -->
		<view :class="[yd ? 'dp_ff' : 'dp_ff hide']" @click="bt_yd2">
			移动至此处
		</view>

		<view class="dp_ff hide">
			<image src="../../static/img/doc/ic_transpond_2.png"></image>
			<image src="../../static/img/doc/ic_move_2.png"></image>
			<image src="../../static/img/doc/ic_delet_2.png"></image>
		</view>

		<!-- 弹出层 -->
		<view :class="[ashowpop ? 'tc' : 'tc hide']">
			<view class="jtop_bj" @click="jshow_pop"></view>

			<view :class="[ashowpop_jtop_rl ? 'tc_fbox' : 'tc_fbox hide']">
				<view class="tc_fboxs">
					<view class="tc_fbox_ic" @tap="sczp()">
						<image src="../../static/img/doc/ic_pic.png"></image>
						<text>上传照片</text>
					</view>

					<view class="tc_fbox_ic" @tap="sczp()">
						<l-file ref="lFile" @up-success="onSuccess"></l-file>

						<view>
							<image src="../../static/img/doc/ic_file.png"></image>
							<text>上传文件</text>
						</view>
					</view>
					<view class="tc_fbox_ic" @click="jshow_pop('jfolder')">
						<image src="../../static/img/doc/ic_folde2r.png"></image>
						<text>新建文件夹</text>
					</view>
				</view>
				<view class="tc_fbox_bt" @click="jshow_pop">
					取消
				</view>
			</view>

			<!-- 底部操作弹出层 -->
			<!-- 分享 -->
			<view :class="[ashowpopT ? 'tc_fbox' : 'tc_fbox hide']">
				<view class="tc_tt">
					墨斗文档
				</view>
				<!-- <view class="ddf" @tap="to_sh">
					<image src="../../static/img/doc/ic_transpond_1.png"></image>
					<text>转发</text>
				</view>
				<view class="ddf">
					<image src="../../static/img/doc/ic_wechat.png"></image>
					<text>分享到微信</text>
				</view>
				<view class="ddf" @click="open(0)">
					<image src="../../static/img/doc/ic_other.png"></image>
					<text>用其他应用打开</text>
				</view> -->
				<view class="clear"> </view>
				<view class="ddf" @tap="jshow_pop('jrename')">
					<image src="../../static/img/doc/ic_rename.png"></image>
					<text>重命名</text>
				</view>
				<view class="ddf" @tap="jshow_pop('jdel')">
					<image src="../../static/img/doc/ic_delet_1.png"></image>
					<text>删除</text>
				</view>
				<!-- <view class="ddf" @tap="bt_yd">
					<image src="../../static/img/doc/ic_move_1.png"></image>
					<text>移动</text>
				</view>
				<view class="ddf">
					<image src="../../static/img/doc/ic_selected.png"></image>
					<text>选中</text>
				</view> -->
				<view class="tc_fbox_bt" @tap="jshow_pop">
					取消
				</view>
			</view>

			<!-- 重命名 -->
			<view :class="[ashowpop_jrename ? 'tc_box' : 'tc_box hide']">
				<view class="tc_boxt">
					重命名
				</view>
				<view class="tc_boxtc">
					请输入文件名称
				</view>
				<view class="tc_boxi">
					<input type="text" placeholder="请输入文件名称" :value="jrename_parameter" @input="onKeyInput_c_jrename" />
					<image src="../../static/img/ic_login_delete.png" @tap="sc_jrename" class="tc_boxi_jdel" v-if="jrename_parameter"></image>
				</view>
				<view class="tc_f">
					<view class="tc_fl" @tap="jshow_pop">取消</view>
					<view class="tc_fr" :style="{ opacity: jrename_parameter ? '1' : '.6' }" @tap="jrename_jfolder">确定</view>
				</view>
			</view>

			<!-- 新建 -->
			<view :class="[ashowpop_jfolder ? 'tc_box' : 'tc_box hide']">
				<view class="tc_boxt">
					新建文件夹
				</view>
				<view class="tc_boxtc">
					请输入文件名称
				</view>
				<view class="tc_boxi">
					<input type="text" placeholder="请输入文件名称" :value="jfolder_name" @input="onKeyInputjfolder_name" />
					<image src="../../static/img/ic_login_delete.png" class="tc_boxi_jdel" v-if="jfolder_name" @tap="sc_parameter"></image>
				</view>
				<view class="tc_f">
					<view class="tc_fl" @tap="jshow_pop">取消</view>
					<view class="tc_fr" :style="{ opacity: jfolder_name ? '1' : '.6' }" @tap="bc_jfolder">确定</view>
				</view>
			</view>

			<!-- 删除 -->
			<view :class="[ashowpop_jdel ? 'tc_box' : 'tc_box hide']">
				<view class="tc_boxt">
					删除提醒
				</view>
				<!-- <view class="tc_boxtc" v-if="scname=='文件夹'">
					将同时删除该文件夹内的文件
				</view> -->
				<view class="tc_boxtc" >
					确定要删除吗？
				</view>

				<view class="tc_f">
					<view class="tc_fl" @tap="jshow_pop">取消</view>
					<view class="tc_fr2" @tap="sc_jfolder">删除</view>
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	import request from '@/common/request.js';
	import {
		mapState
	} from 'vuex';

	export default {
		data() {
			return {
				repeat_click: true,
				ashowpop: false,
				ashowpop_jrename: false,
				ashowpop_jfolder: false,
				ashowpop_jdel: false,
				ashowpopT: false,
				bj: false,
				yd: false,
				ashowpop_jtop_rl: false,
				jfolder_name: '',
				jname: '',
				url: 'https://uniapp.dcloud.io/',
				items: '',
				item_wj: '',
				jqeditjfolder: '',
				jrename_parameter: '',
				syj: false,
				xd: '',
				parentFolderId: '', // 所选的文件夹
				folderList: [], // 文件夹列表
				fileList: [], // 文件列表
				scname:""
			};
		},
		onShow() {
			// this.lb();
			this.handleGetFolder();
			this.handleGetFile();
		},
		onLoad(e) {
			this.parentFolderId = e.parentFolderId
		},
		methods: {
			/**
			 * 查询所选文件夹下的子文件夹
			 */
			handleGetFolder() {
				this.folderList = [];
				var param = {
					parentId: this.parentFolderId
				}
				request({
					url: `/biz/modor-folder/list`,
					method: 'GET',
					data: param,
					success: res => {
						console.log('查询所选文件夹下的文件夹返回信息', res);
						if (res.data.success == true && res.data.data) {
							if (res.data.data.length > 0) {
								this.folderList = res.data.data
							}
						}
					},
					fail: () => {
						this.repeat_click = true;
						uni.showToast({
							title: '服务器开小差，请稍后~',
							icon: 'none',
						});
						return false;
					},
				});
			},
			/**
			 * 查询所选文件夹下的文件
			 */
			handleGetFile() {
				this.fileList = []
				var param = {
					folderId: this.parentFolderId
				}
				request({
					url: `/biz/modor-file/list`,
					method: 'GET',
					data: param,
					success: res => {
						console.log('查询所选文件夹下的文件返回信息', res);
						if (res.data.success == true && res.data.data) {
							if (res.data.data.length > 0) {
								this.fileList = res.data.data
							}
						}
					},
					fail: () => {
						this.repeat_click = true;
						uni.showToast({
							title: '服务器开小差，请稍后~',
							icon: 'none',
						});
						return false;
					},
				});
			},

				conver(limit) {
				var size = '';
				//   if (limit < 0.1 * 1024) {
				//     //如果小于0.1KB转化成B
				//     size = limit.toFixed(2) + 'B';
				//   } else if (limit < 0.1 * 1024 * 1024) {
				//如果小于0.1MB转化成KB
				size = (limit / 1024).toFixed(2);
				//   } else if (limit < 0.1 * 1024 * 1024 * 1024) {
				//     //如果小于0.1GB转化成MB
				//     size = (limit / (1024 * 1024)).toFixed(2) + 'MB';
				//   } else {
				//     //其他转化成GB
				//     size = (limit / (1024 * 1024 * 1024)).toFixed(2) + 'GB';
				//   }

				var sizestr = size + '';
				var len = sizestr.indexOf('\.');
				var dec = sizestr.substr(len + 1, 2);
				if (dec == '00') {
					//当小数点后为00时 去掉小数部分
					return sizestr.substring(0, len) + sizestr.substr(len + 3, 2);
				}
				return sizestr;
				},
			sczp() {
				var that = this;
				uni.chooseImage({
					count: 1, //默认9
					sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图，默认二者都有
					// sourceType: ['camera'], //从相册选择、摄像头
					success: function(res) {
						console.log(
							'aaaa0:',
							JSON.stringify(res.tempFilePaths, res.tempFiles[0]),
						);
						console.log('aaaa:', res.tempFiles);


						 var asize = that.conver(res.tempFiles[0].size);
						var aname = res.tempFiles[0].name;
						var str;
						var ipos;
						str = res.tempFiles[0].type;
						ipos = str.indexOf('/');

						var str2 = str.substring(ipos, str.length); //取后zhuan部shu分
console.log("大小：",asize);

						that.sctp(res.tempFilePaths, res.tempFiles[0], str2, asize, aname);
		  

						// that.sctp(res.tempFilePaths, res.tempFiles[0]);
					},
				});
			},

	

			sctp(a, b, c, d, e) {
				console.log(a);
				var als = '';
				var tpbt = b.name;
				if (tpbt == undefined || tpbt == 'undefined') {
					tpbt = b.path;
				}
				var tpdx = b.size;
				var tplx = b.type;
				var pos = tpbt.lastIndexOf('.');
				var suffix = tpbt.substring(pos);

				function random_string(len) {
					len = len || 32;
					var chars = 'ABCDEFGHJKMNPQRSTWXYZabcdefhijkmnprstwxyz2345678';
					var maxPos = chars.length;
					var pwd = '';
					for (var i = 0; i < len; i++) {
						pwd += chars.charAt(Math.floor(Math.random() * maxPos));
					}
					return pwd;
				}
				var g_object_name = random_string(10) + suffix;

				// 获取信息
				request({
					url: '/biz/oss/policy',
					method: 'GET',
					success: res => {
						if (res.data.success == true) {
							als = res.data.data;
							request({
								filePath: a[0],
								oss: true,
								formData: {
									name: tpbt,
									key: als.dir + g_object_name,
									policy: als.policy,
									OSSAccessKeyId: als.accessid,
									signature: als.signature,
									callback: als.callback,
									success_action_status: '200',
								},
								success: res => {
									var cc = JSON.parse(res.data);
									console.log('上传图片', cc);
									if (cc.code == '00000') {
										var lstp = tpbt;
										var lstp2 = cc.data.url + '/' + als.dir + g_object_name;
										//图片放文件夹里面
										request({
											url: '/biz/modor-file',
											method: 'POST',
											data: {

												 capacity: d,
           
			  									suffix: suffix.replace('.', ''),
			  
												// capacity: tpdx,
												folderId: this.parentFolderId,
												name: tpbt,
												url: lstp2,
											},
											success: res => {
												console.log('放文件夹里面', res);

												if (res.data.success == true) {
													this.ashowpop_jtop_rl = false;
													this.ashowpopT = false;
													this.ashowpop = false;
													this.ashowpop_jrename = false;
													this.ashowpop_jfolder = false;
													var that = this;

													wx.showToast({
														title: '上传成功',
														icon: 'none',
														duration: 1000,
														success: function() {
															setTimeout(function() {
																// that.lb();
																	that.handleGetFolder();
																	that.handleGetFile();
															}, 200);
														},
													});
												}
											},
										});
									}
								},
							});
						}
					},
				});
			},
			scwj() {
				console.log(1111111111);



			},
			lb(a) {
				// this.projectId = uni.getStorageSync("dqfull_name").id;
				var folderId = 0;
				if (a) {
					folderId = a;
				}
				// 获取列表信息
				request({
					url: `/biz/modor-folder`,
					method: 'GET',
					success: res => {
						console.log('111文件夹列表', res);
						console.log(res.data.data.length);
						if (res.data.success == true) {
							// console.log('1111:', res.data.data.length);
							if (res.data.data.length > 0) {
								this.folderList = res.data.data;
								// console.log(this.items);
								this.nodata = false;
							} else {
								this.dqfull_name = '';
								this.nodata = true;
							}
						}
					},
				});
				request({
					url: `/biz/modor-file/page`,
					data: {
						folderId: folderId,
						page: 1,
						size: 100,
					},
					method: 'GET',
					success: ares => {
						console.log('222文件列表', ares);
						if (ares.data.success == true) {
							if (ares.data.data.rows.length > 0) {
								var cc = ares.data.data.rows;

								for (var i = 0; i < cc.length; i++) {
									var str = cc[i].name;
									// console.log(str);
									var startIndex = str.lastIndexOf('.');

									str = str.substring(startIndex + 1, str.length).toLowerCase();
									// console.log(str);
									cc[i].lx = str;
									// console.log('bbbbb:', cc[i].lx);
								}

								this.fileList = cc;
								// console.log('文件列表2', this.item_wj);

								this.nodata = false;
							} else {
								this.dqfull_name = '';
								this.nodata = true;
							}
						}
					},
				});
			},

			open(types) {
				plus.runtime.openURL(this.url, function(res) {
					console.log(res);
				});
			},

			qk() {
				this.jname = '';
			},

			onKeyInput_c: function(event) {
				this.jname = event.detail.value;
			},

			onKeyInput_c_jrename: function(event) {
				this.jrename_parameter = event.detail.value;
			},

			onKeyInputjfolder_name: function(event) {
				this.jfolder_name = event.detail.value;
			},

			sc_parameter() {
				this.jfolder_name = '';
			},

			sc_jrename() {
				this.jrename_parameter = '';
			},

			sc_jfolder() {
				var jc = '';
				if (this.xd == 'jfolder') {
					jc = {
						folderId: this.jqeditjfolder,
					};
				} else {
					jc = {
						fileIds: [this.jqeditjfolder],
					};
				}
				// 获取项目角色
				request({
					url: `${
          this.xd == 'jfolder'
            ? '/biz/modor-folder/delete'
            : '/biz/modor-file/delete-batch'
        }`,

					method: 'DELETE',

					data: jc,

					success: res => {
						if (res.data.success == true) {
							var that = this;
							that.ashowpop = !that.ashowpop;
							wx.showToast({
								title: '删除成功',
								icon: 'none',
								duration: 1000,
								success: function() {
									setTimeout(function() {
										// that.lb();
										that.handleGetFolder();
			that.handleGetFile();
									}, 1500);
								},
							});
						} else {
							this.repeat_click = true;
							uni.showToast({
								title: res.data.msg,
								icon: 'none',
							});
						}
					},
					fail: () => {
						this.repeat_click = true;
						uni.showToast({
							title: '服务器开小差，请稍后~',
							icon: 'none',
						});
						return false;
					},
				});
			},

			bc_jfolder() {
				if (!this.repeat_click) {
					return;
				}
				this.repeat_click = false;
				if (!this.jfolder_name) {
					this.repeat_click = true;
					uni.showToast({
						title: '请输入文件名称',
						icon: 'none',
					});
					return;
				}

				request({
					url: `/biz/modor-folder`,
					data: {
						name: this.jfolder_name,
						ownerId: uni.getStorageSync('user').userInfoResponse.id,
						parentId: this.parentFolderId,
						// treeId: 1,
						type: 2,
					},

					method: 'POST',
					success: openIdRes => {
						console.log(openIdRes);
						if (openIdRes.data.success == true) {
							this.ashowpop_jtop_rl = false;
							this.ashowpopT = false;
							this.ashowpop = false;
							this.ashowpop_jrename = false;
							this.ashowpop_jfolder = false;
							this.jfolder_name = '';
							this.repeat_click = true;
							var that = this;
							wx.showToast({
								title: '添加成功',
								icon: 'none',
								duration: 1000,
								success: function() {
									setTimeout(function() {
										// that.lb();
											that.handleGetFolder();
			that.handleGetFile();
									}, 200);
								},
							});
						} else {
							this.repeat_click = true;
							uni.showToast({
								title: openIdRes.data.msg,
								icon: 'none',
							});
							this.isLoading = false;
						}
					},
				});
			},

			jrename_jfolder() {
				if (!this.repeat_click) {
					return;
				}
				this.repeat_click = false;
				if (!this.jrename_parameter) {
					this.repeat_click = true;
					uni.showToast({
						title: '请输入文件名称',
						icon: 'none',
					});
					return;
				}

				request({
					url: `/biz/modor-folder/${this.jqeditjfolder}`,
					data: {
						name: this.jrename_parameter,
						// ownerId: uni.getStorageSync("user").userInfoResponse.id,
						// parentId: 0,
						// // treeId: 1,
						// type: 2
					},

					method: 'PUT',
					success: openIdRes => {
						console.log(openIdRes);
						if (openIdRes.data.success == true) {
							this.ashowpop_jtop_rl = false;
							this.ashowpopT = false;
							this.ashowpop = false;
							this.ashowpop_jrename = false;
							this.ashowpop_jfolder = false;

							var that = this;
							wx.showToast({
								title: '修改成功',
								icon: 'none',
								duration: 1000,
								success: function() {
									setTimeout(function() {
										// that.lb();
											that.handleGetFolder();
			that.handleGetFile();
									}, 200);
								},
							});
						} else {
							this.repeat_click = true;
							uni.showToast({
								title: openIdRes.data.msg,
								icon: 'none',
							});
							this.isLoading = false;
						}
					},
				});
			},

			jsave() {
				if (!this.repeat_click) {
					return;
				}
				this.repeat_click = false;

				if (!this.amount) {
					this.repeat_click = true;
					uni.showToast({
						title: '请输入文件名称',
						icon: 'none',
					});
					return;
				}

				var jd = {
					name: this.jname,
					workGroupId: uni.getStorageSync('temp_data2').id,
				};

				request({
					url: `/modor/v1/project/${
          uni.getStorageSync('dqfull_name').id
        }/work/group/payment`,
					data: jd,

					method: 'POST',
					success: openIdRes => {
						console.log(openIdRes);
						if (openIdRes.data.success == true) {
							wx.showToast({
								title: '修改成功',
								icon: 'none',
								duration: 1000,
								success: function() {
									setTimeout(function() {
										this.ashowpop = !this.ashowpop;
										this.ashowpop_jrename = false;
										this.ashowpop_jdel = false;
										this.ashowpopT = true;

										this.ashowpopT = false;
										this.ashowpop = true;
										this.ashowpop_jrename = true;
									}, 1500);
								},
							});
						} else {
							this.repeat_click = true;
							uni.showToast({
								title: openIdRes.data.msg,
								icon: 'none',
							});
							this.isLoading = false;
						}
					},
				});
			},

			// 跳转
			to_gis() {
				uni.navigateTo({
					url: '../doc/doc_gis',
				});
			},
			to_sh() {
				uni.navigateTo({
					url: '../doc/doc_user_share',
				});
			},

			bt_yd() {
				console.log('yddddd');
				
				this.ashowpop = !this.ashowpop;
				this.ashowpopT = !this.ashowpopT;
				this.yd = !this.yd;
			},

			bt_yd2() {
				this.yd = !this.yd;
			},

			jshow_pop(a, b, c) {
				this.ashowpop = !this.ashowpop;
				this.ashowpop_jrename = false;
				this.ashowpop_jfolder = false;
				this.ashowpop_jdel = false;
				this.ashowpopT = true;

				if (a == 'jtop_rl') {
					this.ashowpop_jtop_rl = true;
					this.ashowpopT = false;
					this.ashowpop = true;
					this.ashowpop_jrename = false;
					this.ashowpop_jfolder = false;
				} else if (a == 'jrename') {
					this.ashowpop_jtop_rl = false;
					this.ashowpopT = false;
					this.ashowpop = true;
					this.ashowpop_jrename = true;
					this.ashowpop_jfolder = false;
				} else if (a == 'jfolder') {
					this.ashowpop_jtop_rl = false;
					this.ashowpopT = false;
					this.ashowpop = true;
					this.ashowpop_jrename = false;
					this.ashowpop_jfolder = true;
				} else if (a == 'jdel') {
					this.ashowpop_jtop_rl = false;
					this.ashowpopT = false;
					this.ashowpop = true;
					this.ashowpop_jdel = true;
					this.ashowpop_jfolder = false;
				} else {
					console.log('11111:', a);

					this.jqeditjfolder = a;
					if (b) {
						this.jrename_parameter = b;
					}

					if (c) {
						this.xd = c;
					}
				}
			},
			setbj() {
				this.bj = !this.bj;
			},
			navigateBack() {
				uni.navigateBack();
			},
		},
		computed: mapState(['forcedLogin', 'hasLogin', 'userName']),
	};
</script>

<style>
	.tophr {
		width: 100%;
		height: 88rpx;
	}

	.uni-searchbar {
		box-shadow: none;
	}

	.dp_ff {
		width: 100%;
		height: 90rpx;
		line-height: 90rpx;
		text-align: center;
		font-size: 36rpx;
		text-align: center;
		color: #256aff;
		display: block;
		float: left;
		background: #ffffff;
		position: fixed;
		left: 0;
		bottom: 0;
	}

	.dp_ff image {
		width: 56rpx;
		height: 56rpx;
		display: inline-block;
		margin: 17rpx 80rpx 0;
	}

	.nav {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		background: #ffffff;
		border-bottom: 1px solid #dddddd;
		padding: 0 30rpx;
		box-sizing: border-box;
	}

	.nav text {
		width: auto;
		height: 32rpx;
		font-size: 24rpx;
		line-height: 32rpx;
		color: #999999;
		display: block;
		float: left;
		margin: 10rpx 15rpx 30rpx 0;
	}

	.nav text.active {
		color: #000000;
	}

	.nav image {
		width: 10rpx;
		height: 16rpx;
		display: block;
		float: left;
		margin: 20rpx 15rpx 30rpx 0;
	}

	.tc_box {
		width: 540rpx;
		height: auto;
		background: #ffffff;
		border-radius: 14rpx;
		margin: 460rpx 105rpx 0;
		position: relative;
		z-index: 10001;
		overflow: hidden;
	}

	.tc_boxt {
		width: 100%;
		height: 44rpx;
		font-size: 36rpx;
		line-height: 44rpx;
		display: block;
		float: left;
		text-align: center;
		margin: 40rpx 0 20rpx;
		color: #000000;
	}

	.tc_boxtc {
		width: 100%;
		height: 36rpx;
		font-size: 28rpx;
		line-height: 36rpx;
		display: block;
		float: left;
		text-align: center;
		margin: 0rpx 0 30rpx;
		color: #666666;
	}

	.tc_boxi {
		width: 460rpx;
		height: 88rpx;
		background: #ffffff;
		border-radius: 8rpx;
		border: 1px solid #dddddd;
		display: block;
		float: left;
		margin: 0rpx 40rpx 22rpx 40rpx;
	}

	.tc_boxi input {
		width: 70%;
		height: 48rpx;
		margin: 20rpx 5%;
		font-size: 32rpx;
		color: #000000;
		float: left;
	}

	.tc_boxi image {
		width: 36rpx;
		height: 36rpx;
		display: block;
		float: right;
		margin: 26rpx 20rpx 0rpx 0;
	}

	.tc_f {
		width: 100%;
		height: 100rpx;
		display: block;
		float: left;
		border-top: 1px solid #dcdee3;
		margin: 20rpx 0 0;
	}

	.tc_fl {
		width: 269rpx;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 36rpx;
		color: #256aff;
		display: block;
		float: left;
		border-right: 1px solid #dcdee3;
	}

	.tc_fr {
		width: 269rpx;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 36rpx;
		color: #256aff;
		display: block;
		float: left;
		opacity: 0.5;
	}

	.tc_fr2 {
		width: 269rpx;
		height: 100rpx;
		line-height: 100rpx;
		text-align: center;
		font-size: 36rpx;
		color: #eb5342;
		display: block;
		float: left;
	}

	.tc {
		width: 100%;
		height: 100%;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10000;
		display: block;
	}

	.jtop_bj {
		width: 100%;
		height: 100%;
		background: rgba(0, 0, 0, 0.5);
		position: fixed;
		top: 0;
		left: 0;
		z-index: 10000;
	}

	.tc_fbox_bt {
		width: 100%;
		height: 90rpx;
		line-height: 90rpx;
		display: block;
		float: left;
		text-align: center;
		font-size: 36rpx;
		color: #000000;
		border-top: 20rpx solid #f2f2f2;
		background: #ffffff;
	}

	.tc_fbox {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		background: #f2f2f2;
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 10001;
	}

	.ddf {
		width: 120rpx;
		height: auto;
		display: block;
		float: left;
		margin: 30rpx 0 20rpx 40rpx;
	}

	.ddf image {
		width: 112rpx;
		height: 112rpx;
		display: block;
		float: left;
		margin: 0 4rpx 20rpx;
	}

	.ddf text {
		width: 120rpx;
		height: auto;
		display: block;
		float: left;
		margin: 0 0 20rpx;
		font-size: 24rpx;
		line-height: 32rpx;
		text-align: center;
		color: #000000;
	}

	.tc_tt {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		margin: 40rpx 0 0;
		font-size: 28rpx;
		line-height: 36rpx;
		text-align: center;
		color: #999999;
	}

	.doc_t {
		width: 690rpx;
		height: 32rpx;
		font-size: 24rpx;
		line-height: 32rpx;
		color: #999999;
		background: rgb(242, 242, 242);
		padding: 14rpx 30rpx;
		display: block;
		float: left;
	}

	.doc_bs {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		background: #ffffff;
		border: 1px solid #dddddd;
		border-left: 0;
		border-right: 0;
	}

	.doc_b {
		width: 720rpx;
		height: auto;
		display: block;
		float: left;
		background: #ffffff;
		border-bottom: 1px solid #dddddd;
		margin: 0 0 0 30rpx;
	}

	.doc_bs .doc_b:last-child {
		border: 0;
	}

	.doc_bl {
		width: 64rpx;
		height: 64rpx;
		display: block;
		float: left;
		margin: 26rpx 20rpx 22rpx 0;
	}

	.doc_bt {
		width: auto;
		height: 42rpx;
		line-height: 42rpx;
		font-size: 34rpx;
		display: block;
		float: left;
		color: #000000;
		margin: 37rpx 0 0 0;
	}

	.doc_br {
		width: 48rpx;
		height: 48rpx;
		display: block;
		float: right;
		margin: 32rpx 30rpx 32rpx 0;
	}

	.doc_b2 {
		width: 450rpx;
		height: auto;
		display: block;
		float: left;
	}

	.doc_b2t {
		width: 450rpx;
		height: 42rpx;
		font-size: 34rpx;
		line-height: 42rpx;
		color: #000000;
		margin: 20rpx 0 4rpx;
		display: block;
		float: left;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.doc_b2f {
		width: 450rpx;
		height: 32rpx;
		font-size: 24rpx;
		line-height: 32rpx;
		color: #999999;
		margin: 0rpx 0 rpx;
		display: block;
		float: left;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}

	.index {
		background: rgb(242, 242, 242);
		width: 100%;
		height: auto;
	}

	.jtop {
		width: 100%;
		height: 88rpx;
		background: #ffffff;
		position: fixed;
		top: 0;
		left: 0;
		z-index: 1000;
		box-shadow: inset 0px -1px 0px #dddddd;
	}

	.jtop_l {
		width: auto;
		height: 88rpx;
		display: block;
		float: left;
		font-size: 32rpx;
		color: #000000;
		line-height: 88rpx;
		margin: 0 0 0 30rpx;
		position: relative;
		z-index: 99;
	}

	.jtop_l image {
		width: 48rpx;
		height: 48rpx;
		display: block;
		float: left;
		margin: 20rpx 0 20rpx 0;
	}

	.jtop_lt {
		margin: 0 0 0 10rpx;
	}

	.jtop_r {
		width: 48rpx;
		height: 48rpx;
		display: block;
		float: right;
		margin: 20rpx 20rpx 0 0;
	}

	.jtop_rl {
		margin: 20rpx 30rpx 0 0;
	}

	.jtop_r image {
		width: 48rpx;
		height: 48rpx;
		display: block;
		float: left;
	}

	.jtop_c {
		width: 70%;
		height: 48rpx;
		line-height: 48rpx;
		display: block;
		float: left;
		position: fixed;
		top: 20rpx;
		left: 15%;
		text-align: center;
		font-size: 36rpx;
		color: #000000;
	}

	.jtop_c image {
		width: 36rpx;
		height: 36rpx;
		display: inline-block;
		float: none;
		margin-bottom: -5rpx;
		margin-left: 5rpx;
	}

	.jtop_b {
		width: 100%;
		height: auto;
		background: #ffffff;
		position: fixed;
		top: 88rpx;
		left: 0;
		z-index: 1001;
	}

	.tc_fbox {
		width: 100%;
		height: auto;
		display: block;
		float: left;
		background: #ffffff;
		position: fixed;
		left: 0;
		bottom: 0;
		z-index: 10001;
	}

	.tc_fboxs {
		width: 100%;
		height: auto;
		display: block;
		float: left;
	}

	.tc_fbox_ic {
		width: 33.3333%;
		display: block;
		float: left;
		text-align: center;
		font-size: 28rpx;
		color: #666666;
	}

	.tc_fbox_ic image {
		width: 72rpx;
		height: 72rpx;
		display: block;
		float: none;
		margin: 60rpx auto 24rpx;
	}

	.tc_fbox_ic text {
		width: 100%;
		height: auto;
		display: block;
		float: none;
		margin: 0 auto 64rpx;
	}

	.tc_fbox_bt {
		width: 100%;
		height: 90rpx;
		line-height: 90rpx;
		display: block;
		float: left;
		text-align: center;
		font-size: 36rpx;
		color: #000000;
		border-top: 20rpx solid #f2f2f2;
	}
</style>
